<template>
	<view class="order_wrap">
		<view class="order_bar">
			<view class="order_name">
				我的订单
			</view>
			<view class="order_more" @click="go_order">
				查看全部订单<text class="tn-icon-right tn-color-grey"></text>
			</view>
		</view>
		<view class="order_status" >
			<view v-for="(item, index) in order_list" :key="index">
				<img class="order_img" :src="item.path" alt="">
				<view class="order_status_title">
					{{item.title}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				order_list: [{
					path: '/static/order/order_status1.png',
					title: '待结算'
				}, {
					path: '/static/order/order_status2.png',
					title: '已结算'
				}, {
					path: '/static/order/order_status3.png',
					title: '待发货'
				}, {
					path: '/static/order/order_status4.png',
					title: '已发货'
				}],
			}
		},
		methods: {
			go_order(){
				uni.navigateTo ({
				  url: '/pages/order/order'
				});
			}
		}
	}
</script>

<style scoped lang="scss">
	.order_wrap {
		padding: 20rpx;
		background-color: #fff;

		.order_bar {
			display: flex;
			justify-content: space-between;
			align-items: center;

			.order_name {
				font-size: 36rpx;
				color: #000;
			}

			.order_more {
				margin-top: 10rpx;
			}
		}

		.order_status {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 0 30rpx;
			margin-top: 50rpx;
			.order_img {
				margin-left: 50%;
				transform: translateX(-50%);
				width: 50rpx;
				height: 50rpx;
			}
			.order_status_title {
				text-align: center;
			}
		}
	}
</style>